Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

koptocr: fix and optimize bitmap2pix implementation #60

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

benoit-pierre
Copy link
Contributor

@benoit-pierre benoit-pierre commented Nov 11, 2024

The previous implementation would only work when converting the whole source bitmap (x = 0, y = 0, same source & destination width / height).

Additionally, avoid one unnecessary temporary conversion to a greyscale bitmap when source is 24bit.

Example of borked conversion (24bpp 461×628 → +0+0:460×627):

input_bitmap
borked_pixmap_conversion


This change is Reviewable

The previous implementation would only work when converting the whole
source bitmap (x = 0, y = 0, same source & destination width / height).

Additionally, avoid one unnecessary temporary conversion to a greyscale
bitmap when source is 24bit.
Copy link
Member

@NiLuJe NiLuJe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants